import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;

public class redistest {
    private Jedis jedis;
    @BeforeEach
    void setUp() {
        jedis = new Jedis("localhost",6379);
        jedis.select(0);

    }
    @Test
    void test() {
        jedis.set("name","zhangsan");
        System.out.println(jedis.get("name"));
    }
    @AfterEach
    void tearDown() {
        jedis.close();
    }

}
